<template>
	<view style="height: 1050upx;">
		<block v-for="(item, index) in takeshop" :key="index">
			<view class="content-view" v-if="flaga" @click="takeout(item.openid)">
				<view class="content-img"><image :src="item.logo" mode="aspectFill"></image></view>
				<view class="content-title">
					<text class="conteng-take">{{ item.shop }}</text>
					<view class="conteng-monthly">
						<text>月售200</text>
						<text>约{{ item.duration }}分钟</text>
					</view>
					<view class="conteng-starting">
						<text>起送¥{{ item.delivering }}</text>
						<text>配送¥{{ item.physical }}</text>
						<text>人均¥{{ item.capita }}</text>
					</view>
					<view class="conteng-starting">
						<image src="../../../static/coen/liwu.svg" mode="widthFix"></image>
						<text>{{ item.types }}</text>
					</view>
				</view>
			</view>
		</block>
		<view v-if="flagb" class="flagb">
			<image src="../../../static/coen/meoyopu.png" mode="widthFix"></image>
			{{takeshop}},换个条件试试吧！
		</view>
		<!-- {{takeshop}} -->
	</view>
</template>

<script>
// 导入takeout css文件
// import '../../../common/takeout.css';

export default {
	props:["takeshop"],
	data() {
		return {
			flaga:false,
			flagb:false
		};
	},
	created() {
		// this.getUpdate()
		// console.log(this.takeshop)
	},
	methods:{
		getUpdate(){
			
		},
		takeout(id){
			console.log(id)
			uni.navigateTo({
				url:"../takeout/takeout?id="+id
			})
		}
	},
	computed:{
		scrollfun() {
			console.log(this.takeshop)
		}
	},
	watch:{
		takeshop(){
			// console.log("有啊------------------")
			if(this.takeshop=="没有商品数据"){
				this.flagb=true
				this.flaga=false
				// console.log(this.takeshop)
				console.log("妹有啊")
			}else{
				this.flagb=false
				this.flaga=true
				// console.log(this.takeshop)
				console.log("有啊")
			}
		}
	}
};
</script>

<style scoped>
@import '../../../common/takeout.css';
	
.flagb{
	/* font-size: 46upx;
	color: #666666;
	margin-left: 195upx;
	width: 366upx;
	margin-top: 330upx; */
	width: 400upx;
	height: 400upx;
	margin: 321upx auto 0 auto;
	text-align: center;
	font-size: 28upx;
}
.flagb image {
	display: block;
	width: 250upx;
	height: 250upx;
	margin: 0 auto;
	padding-bottom: 30upx;
}
</style>
